package demo02;

public class BankPay implements Pay{
    double n = 1000;
    public void pay(double money){
        if(n<money){
            System.out.println("你的余额不足");
        }
        else{
            System.out.println("你消费了"+money);
            n = n - money;
            System.out.println("你的余额为"+n);
        }
    }
}
